package com.wpml.netty.rpc.client;

import com.wpml.netty.rpc.ResponseCallback;
import com.wpml.netty.rpc.common.PackMsg;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;


public class ClientResponseHandler extends ChannelInboundHandlerAdapter {

    @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {

        PackMsg respPkg = (PackMsg) msg;

//        System.out.println("ClientResponseHandler 响应 ： " + respPkg.getContent().getRes());

        ResponseCallback.runCallback(respPkg);

    }
}
